<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>业主管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" th:href="@{/js/layui/css/layui.css}">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin layui-col-xs12 layui-col-sm12 layui-col-md12">
    <!-- 顶部菜单 -->
    <div class="layui-header">
        <div class="layui-logo">
            <a href="#" style="color: #009688;font-weight: bold;">layui 后台布局</a>
        </div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-left layui-nav-itemed">
            <li class="layui-nav-item"><a th:href="@{/}">首页</a></li>
            <li class="layui-nav-item layui-this">
                <a href="javascript:;">易收系统</a>
            </li>
        </ul>
    </div>
    <!-- 侧边菜单 -->
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree" lay-filter="">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">易收系统</a>
                    <dl class="layui-nav-child">
                        <dd><a th:href="@{/system/community/toCommunityList}">小区管理</a></dd>
                        <dd><a th:href="@{/system/building/toBuildingList}">楼栋管理</a></dd>
                        <dd class="layui-this"><a href="#">已入驻业主管理</a></dd>
                        <dd><a th:href="@{/system/owner/toOwnerList}">未入驻业主管理</a></dd>
                        <dd><a th:href="@{/system/order/toOrderList}">订单管理</a></dd>
                        <dd><a th:href="@{/system/employee/toEmployeeList}">员工管理</a></dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>

    <!-- 主体内容 -->
    <div class="layui-body" style="margin-left: 30px;margin-right: 30px;">
        <!-- 用户列表 -->
        <div style="margin-top: 20px;margin-bottom: 10px;">
            <h1 align="center" style="font-weight: bold;">已入驻业主列表</h1>
        </div>

        <!-- 查询框开始 -->
        <div style="margin-right: 20px;margin-top: 20px;">
            <form class="layui-form">
                <!-- 用户编号 -->
                <div class="layui-input-inline" style="margin-left: 10px">
                    <input type="text" name="userId" id="s_userId" placeholder="请输入用户编号" autocomplete="off"
                           class="layui-input">
                </div>
                <!-- 名字 -->
                <div class="layui-input-inline" style="margin-left: 10px;">
                    <input type="text" name="userName" id="s_userName" placeholder="请输入查询名字" autocomplete="off"
                           class="layui-input">
                </div>
                <!-- 手机号 -->
                <div class="layui-input-inline" style="margin-left: 10px;;margin-right: 10px;">
                    <input type="text" name="userPhone" id="s_userPhone" placeholder="请输入查询手机号" autocomplete="off"
                           class="layui-input">
                </div>
                <!-- 查询和添加按钮 -->
                <a class="layui-btn layui-btn-sm" lay-submit="" lay-filter="doSearch">查询</a>
                <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
                <a style="float: right;" class="layui-btn layui-btn-sm" id="doAdd">添加</a>
            </form>
        </div>
        <!-- 查询框结束 -->

        <!-- 表格框开始 -->
        <div style="margin-top: 20px;">
            <table class="layui-hide" id="users" lay-filter="userTable"></table>
            <div id="barDemo" style="display: none;">
                <a class="layui-btn layui-btn-xs" lay-event="editUserById">编辑</a>
                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="deleteUserById">删除</a>
                <a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="reviewUserById">审核</a>
            </div>
        </div>
        <!-- 表格框结束 -->

        <!-- 添加用户的弹出层 -->
        <div id="addUserDiv" style="display: none;padding: 40px;">
            <form class="layui-form layui-form-pane" style="margin:10px;">
                <!--业主名字与年龄-->
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">业主名字</label>
                        <div class="layui-input-inline">
                            <input type="text" name="userName" id="a_userName" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline" style="margin-left: 20px;">
                        <label class="layui-form-label">业主年龄</label>
                        <div class="layui-input-inline">
                            <input type="text" name="userAge" id="a_userAge" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <!--业主联系方式与密码-->
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">联系方式</label>
                        <div class="layui-input-inline">
                            <input type="text" name="userPhone" id="a_userPhone" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline" style="margin-left: 20px;">
                        <label class="layui-form-label">业主密码</label>
                        <div class="layui-input-inline">
                            <input type="text" name="userPassword" id="a_userPassword" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <!--区域地址和详细地址-->
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">区域地址</label>
                        <div class="layui-input-inline">
                            <input type="text" name="areaAddress" id="a_areaAddress" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline" style="margin-left: 20px;">
                        <label class="layui-form-label">详细地址</label>
                        <div class="layui-input-inline">
                            <input type="text" name="detailedAddress" id="a_detailedAddress" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <!--楼层单元号和用户注册时间-->
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">单元号</label>
                        <div class="layui-input-inline">
                            <input type="text" name="floorUnit" id="a_floorUnit" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline" style="margin-left: 20px;">
                        <label class="layui-form-label">注册时间</label>
                        <div class="layui-input-inline">
                            <input type="text" name="registerTime" id="a_registerTime" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <!--累计积分和可用积分-->
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">累计积分</label>
                        <div class="layui-input-inline">
                            <input type="text" name="accumulatedPoints" id="a_accumulatedPoints" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline" style="margin-left: 20px;">
                        <label class="layui-form-label">可用积分</label>
                        <div class="layui-input-inline">
                            <input type="text" name="availablePoints" id="a_availablePoints" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <!--所属小区和小区id-->
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">所属小区</label>
                        <div class="layui-input-inline">
                            <input type="text" name="communityName" id="a_communityName" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline" style="margin-left: 20px;">
                        <label class="layui-form-label">小区ID</label>
                        <div class="layui-input-inline">
                            <input type="text" name="communityId" id="a_communityId" lay-verify="required|number" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <!-- 用户头像 -->
                <div class="layui-form-item" style="margin-top: 30px;">
                    <label class="layui-form-label">头像</label>
                    <div class="layui-upload-list thumbBox mag0 " style="margin-left: 110px;">
                        <input type="hidden" name="userPic" id="a_userPic" value="">
                        <img id="addUserPic" style="width: 80px;height:80px;margin-left: 10px;" class="layui-upload-img thumbImg" alt="">
                    </div>
                </div>
                <!-- 提交和重置按钮 -->
                <div class="layui-form-item" style="margin-top: 50px;margin-left: 180px;">
                    <div class="layui-input-block">
                        <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="doSubmit">提交
                        </button>
                        <button type="reset" id="reloadFrame" class="layui-btn layui-btn-sm layui-btn-primary">重置
                        </button>
                    </div>
                </div>
            </form>
        </div>
        <!-- 添加用户的弹出层结束 -->

        <!-- 审核用户的身份证信息 -->
        <div id="reviewIdentityDiv" style="display: none;padding: 20px;">
            <form class="layui-form layui-form-pane" style="margin:20px;" lay-filter="formData">
                <!-- 用户的id值,需要隐藏起来 -->
                <input type="hidden" name="userId" id="e_userId" lay-verify="required" autocomplete="off">

                <!-- 用户姓名和用户身份证号 -->
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">真实姓名</label>
                        <div class="layui-input-inline">
                            <input type="text" name="identityName" id="e_identityName" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline" style="margin-left: 20px;">
                        <label class="layui-form-label">身份证号</label>
                        <div class="layui-input-inline">
                            <input type="text" name="identityNum" id="e_identityNum" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>

                <div class="layui-upload" style="margin: 20px;">
                    <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 20px;min-height: 150px;">
                        <!-- 这个div是为了清空旧的节点 -->
                        <div class="layui-upload-list" id="userIdentityPic"></div>

                    </blockquote>
                </div>
                <!--审核状态-->
                <div class="layui-form-item" style="margin-left: 20px;">
                    <div class="layui-inline">
                        <label class="layui-form-label">身份验证</label>
                        <div class="layui-input-inline">
                            <select name="identityStatus" id="e_identityStatus">
                                <option value="0" selected="">未验证</option>
                                <option value="1">待审核</option>
                                <option value="2">审核成功</option>
                                <option value="3">审核失败</option>
                            </select>
                        </div>
                    </div>
                </div>

                <!-- 修改按钮 -->
                <div class="layui-form-item" style="margin-top: 20px;margin-left: 180px;">
                    <div class="layui-input-block">
                        <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="reviewSubmit">修改
                        </button>
                    </div>
                </div>

            </form>
        </div>
        <!-- 审核用户的的弹出层结束 -->

        <!-- 修改用户的弹出层 -->
        <div id="editUserDiv" style="display: none;padding:40px;">
            <form class="layui-form layui-form-pane" style="margin:10px;" lay-filter="formData">
                <!-- 用户的id值,需要隐藏起来 -->
                <div>
                    <div class="layui-form-item" style="width: 350px;">
                        <input type="hidden" name="userId" id="edit_id" lay-verify="required" autocomplete="off">
                    </div>
                </div>
                <!--业主名字与年龄-->
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">业主名字</label>
                        <div class="layui-input-inline">
                            <input type="text" name="userName" id="e_userName" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline" style="margin-left: 20px;">
                        <label class="layui-form-label">业主年龄</label>
                        <div class="layui-input-inline">
                            <input type="text" name="userAge" id="e_userAge" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <!--业主联系方式与密码-->
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">联系方式</label>
                        <div class="layui-input-inline">
                            <input type="text" name="userPhone" id="e_userPhone" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline" style="margin-left: 20px;">
                        <label class="layui-form-label">业主密码</label>
                        <div class="layui-input-inline">
                            <input type="text" name="userPassword" id="e_userPassword" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <!--区域地址和详细地址-->
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">区域地质</label>
                        <div class="layui-input-inline">
                            <input type="text" name="areaAddress" id="e_areaAddress" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline" style="margin-left: 20px;">
                        <label class="layui-form-label">详细地址</label>
                        <div class="layui-input-inline">
                            <input type="text" name="detailedAddress" id="e_detailedAddress" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <!--楼层单元号和用户注册时间-->
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">单元号</label>
                        <div class="layui-input-inline">
                            <input type="text" name="floorUnit" id="e_floorUnit" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline" style="margin-left: 20px;">
                        <label class="layui-form-label">注册时间</label>
                        <div class="layui-input-inline">
                            <input type="text" name="registerTime" id="e_registerTime" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <!--累计积分和可用积分-->
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">累计积分</label>
                        <div class="layui-input-inline">
                            <input type="text" name="accumulatedPoints" id="e_accumulatedPoints" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline" style="margin-left: 20px;">
                        <label class="layui-form-label">可用积分</label>
                        <div class="layui-input-inline">
                            <input type="text" name="availablePoints" id="e_availablePoints" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <!--所属小区和小区id-->
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">所属小区</label>
                        <div class="layui-input-inline">
                            <input type="text" name="communityName" id="e_communityName" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline" style="margin-left: 20px;">
                        <label class="layui-form-label">小区ID</label>
                        <div class="layui-input-inline">
                            <input type="text" name="communityId" id="e_communityId" lay-verify="required|number" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <!-- 用户头像 -->
                <div class="layui-form-item" style="margin-top: 30px;">
                    <label class="layui-form-label">头像</label>
                    <div class="layui-upload-list thumbBox mag0 " style="margin-left: 110px;">
                        <input type="hidden" name="userPic" id="e_userPic" value="">
                        <img id="editUserPic" style="width: 80px;height: 80px;margin-left: 10px;" class="layui-upload-img thumbImg" alt="">
                    </div>
                </div>
                <!-- 修改和重置按钮 -->
                <div class="layui-form-item" style="margin-top: 50px;margin-left: 180px;">
                    <div class="layui-input-block">
                        <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="editSubmit">修改
                        </button>
                        <button type="reset" id="reloadMessage" class="layui-btn layui-btn-sm layui-btn-primary">重置
                        </button>
                    </div>
                </div>
            </form>
        </div>
        <!-- 修改用户的弹出层结束 -->
        <!-- 主体内容结束 -->
    </div>
</div>

<!-- 用户列表结束 -->
<!-- 以下是layui函数代码块 -->
<script type="application/javascript" th:src="@{/js/layui/layui.js}"></script>
<!-- 导入用户列表的js文件 -->
<script type="application/javascript" th:src="@{/js/layui/sys_user.js}"></script>
</body>
</html>